In advanced technology nodes of integrated circuit industry, high k dielectric material and metal are adopted to form a gate stack of a field-effect transistor (FET) such as a metal-oxide-semiconductor field-effect transistor (MOSFET). In existing methods to form the metal gate stack, metal gates are formed in a gate replacement process that removes dummy gates and fills in the gate trenches with gate materials. Due to high packing density and small feature sizes, it is challenging to achieve proper gap filling and profile control, especially for the FETs with 3D structure, such as 3D fin field effect transistors (FINFETs). Therefore, a structure of a metal gate stack and a method making the same are needed to address the issues identified above.